Skip to content

Add adaptive stdev scaling to local search neighborhood sampling #954#1303

Open
JannisKst wants to merge 2 commits intodevelopmentfrom
feature/adaptive-stdev-ls-954
Open

Add adaptive stdev scaling to local search neighborhood sampling #954#1303
JannisKst wants to merge 2 commits intodevelopmentfrom
feature/adaptive-stdev-ls-954

Conversation

@JannisKst
Copy link
Collaborator

This PR adds adaptive scaling of the neighborhood sampling standard deviation for continuous hyperparameters based on local search progress.

The scaling follows these rules:

  • Each local search starts with an initial stdev of 0.05.
  • After 3 consecutive improvements, the stdev is doubled, up to a maximum of stdev_init * 8.
  • After every third plateau walk, the stdev is halved.

These changes were benchmarked in the SMAC3-Benchmarking repository. The repository also contains additional details explaining the design and implementation choices.

Copy link

@mwever mwever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the comments made below.


hp_names = list(start_points[0].config_space.keys())

# Initial standard deviation used when sampling continuous neighbors.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, no magic constants in our code :-)

Can you please add these parameters as actual parameters for this class? You can still set default values, no problem, but these parameters should not just simply pop up within an internal method.

improvement_count[i] = 0

# Increase exploration radius if the search improves consistently.
if improvement_count[i] >= 3 and n_no_plateau_walk[i] == 0:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here please no magic constants in between. The limit for scaling out or zooming in should be a parameter of this class.

n_no_plateau_walk[i] += 1
# Reduce exploration radius during plateau walking to refine the
# search locally around the current candidate.
if n_no_plateau_walk[i] % 3 == 0:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

  `_stdev_init`, `_stdev_min`, `_stdev_max`, `_upscale_thresh`, `_downscale_interval`
- `_stdev_max` can be None, in which case it is computed heuristically
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants